/*
 * @Description:
 * @Author: Zzt
 * @Date: 2023-01-07 09:57:21
 * @LastEditTime: 2023-01-07 20:57:46
 */

import TemplateTypeNav from './TemplateTypeNav';
import PageList from './PageList';
import PageOperate from './PageOperate';

import styles from '../styles/index.module.scss';
import classNames from 'classnames/bind';
import { useTemplateManageContext } from '../contexts/TemplateManageContext';

const cx = classNames.bind(styles);
const PageContent = () => {
  const { setTplType, setMethodType } = useTemplateManageContext();
  const typeChange = ({ methodType, tplType }: any) => {
    setTplType(tplType);
    setMethodType(methodType);
  };

  return (
    <>
      <div className={cx('out-flex')}>
        <TemplateTypeNav onChange={typeChange} />
        <div className={cx('all-width')}>
          <PageOperate />
          <PageList />
        </div>
      </div>
    </>
  );
};
export default PageContent;
